import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;

public class prctice {
    public static void main(String[] args) {
        JFrame frame = new JFrame("账号登录");
        frame.setSize(600, 250);
        frame.getContentPane().setBackground(Color.white);
        frame.setLayout(null);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        JTextField textField = new JTextField();
        textField.setBounds(50, 150, 400, 45);
        frame.add(textField);

        JButton button = new JButton("登录");
        button.setBounds(450, 150, 100, 45);
        button.addActionListener(e -> {
            String text = textField.getText();
            if ("sssa123".equals(text)) {
                JOptionPane.showMessageDialog(null, "对的对的对的", "提示", JOptionPane.INFORMATION_MESSAGE);
            } else {
                JOptionPane.showMessageDialog(null, "不对不对不对", "提示", JOptionPane.INFORMATION_MESSAGE);
            }
        });
        frame.add(button);

        frame.setVisible(true);
    }
}
